# 创建一个数组
my_array = [1, 2, 3, 4, 5]

# 要移除的元素索引列表
indexes_to_remove = [1, 3]

# 使用列表推导式生成新数组
new_array = [element for index, element in enumerate(my_array) if index not in indexes_to_remove]

# 打印新数组
print(new_array)


       #  if metric == 'xqmc':
       #      _metric = "xq.xqm as '校区码',xq.xqmc as '校区名称'"
       #      _prima= "(select * from T_XQ) xq"
       #
       #  if metric == 'yx':
       #      _metric = "yx.yxm as '院系码',yx.yx as '院系名称'"
       #      _prima="(select * from T_DW) yx"
       #      _inner = '''(
       #                  (SELECT xh,T_DW.dwm,T_DW.dwmc from T_XSJBXX xs LEFT JOIN T_DW on xs.yxm=T_DW.dwm) xs on xs.xh=t.xh
       #      				) new on yx.dwm=new.dwm
       #                  '''
       #  if metric == 'zym':
       #      _metric = "zy.zym as '专业码',zy.zymc as '专业名称'"
       #      _prima="(select * from T_ZY) zy"
       #      _inner = '''(
       #                  select xs.xh,zy.zym,zy.zymc from T_XSJBXX xs
       #                  LEFT JOIN T_ZY zy on zy.zydm=xs.zym and zy.yxdm=xs.yxm) xs on xs.xh=t.xh
       #                      ) new on zy.zym=
       #                      '''
       #  if metric =='pycc':
       #      _metric = "py.pycc as '培养层次'"
       #      _prima = '''
       #                  (select '本专科生' pycc union all select '研究生') py
       #                  '''
       #      _inner='''(
       #      (select '本专科生' pycc union all select '研究生') py on py.pycc=t.pycc
       #      )new py.
       #      '''
       #
       #  aggregate=' count(1) ' if 'num' not in self.before_sql(where) else ' sum(num) '
       #
       #
       #  sql = '''
       # select {},case when SUM(num) is null then 0 else SUM(num) end num FROM {}
       #  LEFT JOIN (
       #      {}
       #      ) t
		# 	INNER JOIN {} on dw.dwm=new.dwm
		# 		GROUP BY dwm,dwmc
       #  '''.format(_metric,aggregate,self.SERVICE_NAME,self.before_sql(where))